<?php
/*
 * Squelette : fstdtweekly/author.html
 * Date :      Fri, 17 Nov 2006 20:12:53 GMT
 * Compile :   Fri, 17 Nov 2006 20:12:56 GMT (0.03s)
 * Boucles :   _arts, _author
 */ 
//
// <BOUCLE articles>
//
function BOUCLE_artshtml_6cc73526be5eb79531521aa593af951f(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("articles.id_article",
		"articles.titre",
		"articles.lang"), # SELECT
		array("spip_auteurs_articles AS auteurs_articles1","spip_articles AS articles"), # FROM
		array("articles.id_article=auteurs_articles1.id_article",
		"(auteurs_articles1.id_auteur = '" . addslashes($Pile[$SP]['id_auteur']) . "')",
		"articles.statut='publie'"), # WHERE
		'articles.id_article', # GROUP
		array('articles.titre'), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'articles', # table
		'_arts', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_article'][$Pile[$SP]['id_article']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('
			<li>
				<a href="article.php?id_article=' .
$Pile[$SP]['id_article'] .
'">' .
interdire_scripts(typo($Pile[$SP]['titre'])) .
'</a>
			</li>
	');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE auteurs>
//
function BOUCLE_authorhtml_6cc73526be5eb79531521aa593af951f(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	// REQUETE
	$result = spip_abstract_select(
		array("auteurs.id_auteur",
		"auteurs.lang",
		"auteurs.nom",
		"auteurs.bio"), # SELECT
		array("spip_auteurs AS auteurs","spip_auteurs_articles AS lien","spip_articles AS articles"), # FROM
		array("(auteurs.id_auteur = '" . addslashes($Pile[$SP]['id_auteur']) . "')",
		"lien.id_auteur=auteurs.id_auteur",
		"lien.id_article=articles.id_article",
		"articles.statut='publie'",
		"NOT(auteurs.statut='5poubelle')"), # WHERE
		'auteurs.id_auteur', # GROUP
		array(), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'auteurs', # table
		'_author', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_auteur'][$Pile[$SP]['id_auteur']] = 1; // invalideurs

		$t0 .= ('
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html dir="' .
lang_dir(($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang']),'ltr','rtl') .
'" lang="' .
htmlentities($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang']) .
'">
	<head>
	<title>' .
interdire_scripts(typo($Pile[$SP]['nom'])) .
' - ' .
interdire_scripts(typo(lire_meta('nom_site'))) .
'</title>
	' .

'<?php
	$contexte_inclus = array();
	include(\'fstdtweekly/header.php\');
?'.'>' .
'
	
	<p>
	<div class="headertext">' .
interdire_scripts(typo($Pile[$SP]['nom'])) .
'</div>
	
	' .
interdire_scripts(traiter_raccourcis($Pile[$SP]['bio'])) .
'
	
	' .
(($t1 = interdire_scripts(calculer_notes())) ?
			('<blockquote>' . $t1 . '</blockquote>') :
			('')) .
'
	
	' .
(($t1 = interdire_scripts(typo($Pile[$SP]['nom']))) ?
			('<p>' . $t1 . '\'s articles:<p>') :
			('')) .
'
	' .
(($t1 = BOUCLE_artshtml_6cc73526be5eb79531521aa593af951f($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			('
		<ul>
	' . $t1) :
			('
		</ul>
	</B_articles>
		Oops, there aren\'t any articles by this author.
	')) .
'
	

	' .

'<?php
	$contexte_inclus = array();
	include(\'fstdtweekly/footer.php\');
?'.'>' .
'
');
	}

	@spip_abstract_free($result,'');
	return $t0;
}



//
// Fonction principale du squelette fstdtweekly/author.html
//
function html_6cc73526be5eb79531521aa593af951f ($Cache, $Pile, $doublons=array(), $Numrows='', $SP=0) {
$t0 = (($t1 = BOUCLE_authorhtml_6cc73526be5eb79531521aa593af951f($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			($t1) :
			(('

	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html dir="' .
lang_dir(($Pile[0]['lang'] ? $Pile[0]['lang'] : $GLOBALS['spip_lang']),'ltr','rtl') .
'" lang="' .
htmlentities($Pile[0]['lang'] ? $Pile[0]['lang'] : $GLOBALS['spip_lang']) .
'">
	<head>
	<title>Author Not Found - ' .
interdire_scripts(typo(lire_meta('nom_site'))) .
'</title>
	' .

'<?php
	$contexte_inclus = array();
	include(\'fstdtweekly/header.php\');
?'.'>' .
'
	Oops, you seem to have stumbled into a section of the site that doesn\'t exist yet. I recommend clicking the back button, lest ye be eaten by a grue.
	' .

'<?php
	$contexte_inclus = array();
	include(\'fstdtweekly/footer.php\');
?'.'>' .
'
')));

	return array(
		'texte' => $t0,
		'squelette' => 'html_6cc73526be5eb79531521aa593af951f',
		'process_ins' => ((strpos($t0,'<'.'?')=== false) ? 'html' : 'php'),
		'invalideurs' => $Cache
	);
}

?>